<?php $this->load->view('Admin/navbar');?>
<!-- Tab panes -->
<div class="tab-content" style="margin-top: 10px;">
	<div role="tabpanel" class="tab-pane" id="<?=$focusTag?>">

		<div class="panel panel-default">
		  <!-- Default panel contents -->
		  <div class="panel-heading">导出条件</div>
		  <div class="panel-body">
				  <div class="col-sm-7 col-md-offset-3">
				  	<form class="form-horizontal" name="add" id="add" action="<?php echo $this->input->server('REQUEST_URI'); ?>" method="get">
					  	<input type="hidden" name="c" id="c" value="Admin">
					  	<input type="hidden" name="m" id="m" value="xunOutput">
					  	<input type="hidden" name="runing" id="runing" value="1">
						   <div class="form-group">
							    <label for="area" class="col-sm-2 control-label">地区:</label>
							    <div class="col-sm-4">
							    <select class="form-control" id="area" name="area">
								  <option value="">请选择地区</option>
								</select>
								</div>
							  </div>
							  <div class="form-group">
							    <label for="region" class="col-sm-2 control-label">大区:</label>
							    <div class="col-sm-4">
							    <select class="form-control" id="region" name="region">
								  <option value="">请选择大区</option>
								</select>
								</div>
							  </div>
							  <div class="form-group">
							    <label for="province" class="col-sm-2 control-label">省份:</label>
							    <div class="col-sm-4">
							    <select class="form-control" id="province" name="province">
								  <option value="">请选择省份</option>
								</select>
								</div>
							  </div>
							  <div class="form-group">
							    <label for="city" class="col-sm-2 control-label">城市:</label>
							    <div class="col-sm-4">
							    <select class="form-control" id="city" name="city">
								  <option value="">请选择城市</option>
								</select>
								</div>
							  </div>
							  <div class="form-group">
							    <label for="storeId" class="col-sm-2 control-label">专营店:</label>
							    <div class="col-sm-4">
							    <select class="form-control" id="storeId" name="storeId">
								  <option value="">请选择专营店</option>
								</select>
								</div>
							  </div>
							  <div class="form-group">
							    <label for="year" class="col-sm-2 control-label">所属年份：</label>
							    <div class="col-sm-4">
							    <select class="form-control" id="year" name="year">
							      <option value="">请选择</option>
								</select>
								</div>
							  </div>
							  <div class="form-group">
							    <label for="timeUnit" class="col-sm-2 control-label">所属双月：</label>
							    <div class="col-sm-4">
							    <select class="form-control" id="timeUnit" name="timeUnit">
							      <option value="">请选择</option>
								</select>
								</div>
							  </div>
						 <div class="form-group text-center">
						 	<button type="submit" class="btn btn-default btn-primary">导出</button>
						</div>
				  	</form>
				  </div>
				</div>

		  </div>
	</div>
</div>
<script type="text/javascript">
	$(function(){
		loadYearList('year',<?=$year ? $year : 0?>);
	    loadTimeUnitList('timeUnit',<?=$year ? $year : 0?>,<?=$timeUnit ? $timeUnit : 0?>);
		loadPlaceList('area', 'area', '', '<?=$area?>');
		loadPlaceList('region', 'region', '<?=$area?>', '<?=$region?>');
		loadPlaceList('province', 'province', '<?=$region?>', '<?=$province?>');
		loadPlaceList('city', 'city', '<?=$province?>', '<?=$city?>');
		loadPlaceList('storeId', 'store', '<?=$city?>', '<?=$storeId?>');
	});
    $("#year").change(function(){
      loadTimeUnitList('timeUnit',this.value);
    });
	$('#area').change(function(){
		loadPlaceList('region', 'region', this.value, '');
		loadPlaceList('province', 'province', '', '');
		loadPlaceList('city', 'city', '', '');
		loadPlaceList('storeId', 'store', '', '');
	});
	$('#region').change(function(){
		loadPlaceList('province', 'province', this.value, '');
		loadPlaceList('city', 'city', '', '');
		loadPlaceList('storeId', 'store', '', '');
	});
	$('#province').change(function(){
		loadPlaceList('city', 'city', this.value, '');
		loadPlaceList('storeId', 'store', '', '');
	});
	$('#city').change(function(){
		loadPlaceList('storeId', 'store', this.value, '');
	});
</script>
<?php $this->load->view('Admin/foot');?>